/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.TraceAnnotationExperimental;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * EXPERIMENTAL: This schema is experimental and may be changed (or even removed) without notice until it is declared stable.
 */
@JsonPropertyOrder({
  TraceExperimental.JSON_PROPERTY_ID,
  TraceExperimental.JSON_PROPERTY_SAMPLE_ID,
  TraceExperimental.JSON_PROPERTY_SAMPLE_NAME,
  TraceExperimental.JSON_PROPERTY_LABEL,
  TraceExperimental.JSON_PROPERTY_COLOR,
  TraceExperimental.JSON_PROPERTY_INTENSITIES,
  TraceExperimental.JSON_PROPERTY_ANNOTATIONS,
  TraceExperimental.JSON_PROPERTY_MZ,
  TraceExperimental.JSON_PROPERTY_MERGED,
  TraceExperimental.JSON_PROPERTY_NORMALIZATION_FACTOR,
  TraceExperimental.JSON_PROPERTY_NOISE_LEVEL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class TraceExperimental {
  public static final String JSON_PROPERTY_ID = "id";
  @jakarta.annotation.Nullable
  private String id;

  public static final String JSON_PROPERTY_SAMPLE_ID = "sampleId";
  @jakarta.annotation.Nullable
  private String sampleId;

  public static final String JSON_PROPERTY_SAMPLE_NAME = "sampleName";
  @jakarta.annotation.Nullable
  private String sampleName;

  public static final String JSON_PROPERTY_LABEL = "label";
  @jakarta.annotation.Nullable
  private String label;

  public static final String JSON_PROPERTY_COLOR = "color";
  @jakarta.annotation.Nullable
  private String color;

  public static final String JSON_PROPERTY_INTENSITIES = "intensities";
  @jakarta.annotation.Nullable
  private List<Double> intensities;

  public static final String JSON_PROPERTY_ANNOTATIONS = "annotations";
  @jakarta.annotation.Nullable
  private List<TraceAnnotationExperimental> annotations;

  public static final String JSON_PROPERTY_MZ = "mz";
  @jakarta.annotation.Nullable
  private Double mz;

  public static final String JSON_PROPERTY_MERGED = "merged";
  @jakarta.annotation.Nullable
  private Boolean merged;

  public static final String JSON_PROPERTY_NORMALIZATION_FACTOR = "normalizationFactor";
  @jakarta.annotation.Nullable
  private Double normalizationFactor;

  public static final String JSON_PROPERTY_NOISE_LEVEL = "noiseLevel";
  @jakarta.annotation.Nullable
  private Double noiseLevel;

  public TraceExperimental() {
  }

  public TraceExperimental id(@jakarta.annotation.Nullable String id) {
    
    this.id = id;
    return this;
  }

  /**
   * Get id
   * @return id
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getId() {
    return id;
  }


  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(@jakarta.annotation.Nullable String id) {
    this.id = id;
  }

  public TraceExperimental sampleId(@jakarta.annotation.Nullable String sampleId) {
    
    this.sampleId = sampleId;
    return this;
  }

  /**
   * Get sampleId
   * @return sampleId
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SAMPLE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSampleId() {
    return sampleId;
  }


  @JsonProperty(JSON_PROPERTY_SAMPLE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSampleId(@jakarta.annotation.Nullable String sampleId) {
    this.sampleId = sampleId;
  }

  public TraceExperimental sampleName(@jakarta.annotation.Nullable String sampleName) {
    
    this.sampleName = sampleName;
    return this;
  }

  /**
   * Get sampleName
   * @return sampleName
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SAMPLE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSampleName() {
    return sampleName;
  }


  @JsonProperty(JSON_PROPERTY_SAMPLE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSampleName(@jakarta.annotation.Nullable String sampleName) {
    this.sampleName = sampleName;
  }

  public TraceExperimental label(@jakarta.annotation.Nullable String label) {
    
    this.label = label;
    return this;
  }

  /**
   * Get label
   * @return label
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_LABEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getLabel() {
    return label;
  }


  @JsonProperty(JSON_PROPERTY_LABEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLabel(@jakarta.annotation.Nullable String label) {
    this.label = label;
  }

  public TraceExperimental color(@jakarta.annotation.Nullable String color) {
    
    this.color = color;
    return this;
  }

  /**
   * Get color
   * @return color
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COLOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getColor() {
    return color;
  }


  @JsonProperty(JSON_PROPERTY_COLOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setColor(@jakarta.annotation.Nullable String color) {
    this.color = color;
  }

  public TraceExperimental intensities(@jakarta.annotation.Nullable List<Double> intensities) {
    
    this.intensities = intensities;
    return this;
  }

  public TraceExperimental addIntensitiesItem(Double intensitiesItem) {
    if (this.intensities == null) {
      this.intensities = new ArrayList<>();
    }
    this.intensities.add(intensitiesItem);
    return this;
  }

  /**
   * Get intensities
   * @return intensities
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_INTENSITIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<Double> getIntensities() {
    return intensities;
  }


  @JsonProperty(JSON_PROPERTY_INTENSITIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setIntensities(@jakarta.annotation.Nullable List<Double> intensities) {
    this.intensities = intensities;
  }

  public TraceExperimental annotations(@jakarta.annotation.Nullable List<TraceAnnotationExperimental> annotations) {
    
    this.annotations = annotations;
    return this;
  }

  public TraceExperimental addAnnotationsItem(TraceAnnotationExperimental annotationsItem) {
    if (this.annotations == null) {
      this.annotations = new ArrayList<>();
    }
    this.annotations.add(annotationsItem);
    return this;
  }

  /**
   * Get annotations
   * @return annotations
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ANNOTATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<TraceAnnotationExperimental> getAnnotations() {
    return annotations;
  }


  @JsonProperty(JSON_PROPERTY_ANNOTATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAnnotations(@jakarta.annotation.Nullable List<TraceAnnotationExperimental> annotations) {
    this.annotations = annotations;
  }

  public TraceExperimental mz(@jakarta.annotation.Nullable Double mz) {
    
    this.mz = mz;
    return this;
  }

  /**
   * Get mz
   * @return mz
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MZ)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getMz() {
    return mz;
  }


  @JsonProperty(JSON_PROPERTY_MZ)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMz(@jakarta.annotation.Nullable Double mz) {
    this.mz = mz;
  }

  public TraceExperimental merged(@jakarta.annotation.Nullable Boolean merged) {
    
    this.merged = merged;
    return this;
  }

  /**
   * Get merged
   * @return merged
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MERGED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isMerged() {
    return merged;
  }


  @JsonProperty(JSON_PROPERTY_MERGED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMerged(@jakarta.annotation.Nullable Boolean merged) {
    this.merged = merged;
  }

  public TraceExperimental normalizationFactor(@jakarta.annotation.Nullable Double normalizationFactor) {
    
    this.normalizationFactor = normalizationFactor;
    return this;
  }

  /**
   * Traces are stored with raw intensity values. The normalization factor maps them to relative intensities,  such that traces from different samples can be compared.
   * @return normalizationFactor
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NORMALIZATION_FACTOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getNormalizationFactor() {
    return normalizationFactor;
  }


  @JsonProperty(JSON_PROPERTY_NORMALIZATION_FACTOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNormalizationFactor(@jakarta.annotation.Nullable Double normalizationFactor) {
    this.normalizationFactor = normalizationFactor;
  }

  public TraceExperimental noiseLevel(@jakarta.annotation.Nullable Double noiseLevel) {
    
    this.noiseLevel = noiseLevel;
    return this;
  }

  /**
   * The noise level is estimated from the median noise in the surrounding scans. It can be used to  calculate signal-to-noise ratios.
   * @return noiseLevel
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NOISE_LEVEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getNoiseLevel() {
    return noiseLevel;
  }


  @JsonProperty(JSON_PROPERTY_NOISE_LEVEL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNoiseLevel(@jakarta.annotation.Nullable Double noiseLevel) {
    this.noiseLevel = noiseLevel;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TraceExperimental traceExperimental = (TraceExperimental) o;
    return Objects.equals(this.id, traceExperimental.id) &&
        Objects.equals(this.sampleId, traceExperimental.sampleId) &&
        Objects.equals(this.sampleName, traceExperimental.sampleName) &&
        Objects.equals(this.label, traceExperimental.label) &&
        Objects.equals(this.color, traceExperimental.color) &&
        Objects.equals(this.intensities, traceExperimental.intensities) &&
        Objects.equals(this.annotations, traceExperimental.annotations) &&
        Objects.equals(this.mz, traceExperimental.mz) &&
        Objects.equals(this.merged, traceExperimental.merged) &&
        Objects.equals(this.normalizationFactor, traceExperimental.normalizationFactor) &&
        Objects.equals(this.noiseLevel, traceExperimental.noiseLevel);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, sampleId, sampleName, label, color, intensities, annotations, mz, merged, normalizationFactor, noiseLevel);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TraceExperimental {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    sampleId: ").append(toIndentedString(sampleId)).append("\n");
    sb.append("    sampleName: ").append(toIndentedString(sampleName)).append("\n");
    sb.append("    label: ").append(toIndentedString(label)).append("\n");
    sb.append("    color: ").append(toIndentedString(color)).append("\n");
    sb.append("    intensities: ").append(toIndentedString(intensities)).append("\n");
    sb.append("    annotations: ").append(toIndentedString(annotations)).append("\n");
    sb.append("    mz: ").append(toIndentedString(mz)).append("\n");
    sb.append("    merged: ").append(toIndentedString(merged)).append("\n");
    sb.append("    normalizationFactor: ").append(toIndentedString(normalizationFactor)).append("\n");
    sb.append("    noiseLevel: ").append(toIndentedString(noiseLevel)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  public String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

